package org.aplombh.java.interview.leetcode;

public class _674_最长连续递增序列 {
    public int findLengthOfLCIS(int[] nums) {
        int res = 1;
        int sum = 1;
        for (int i = 1; i < nums.length; i++) {
            if (nums[i] > nums[i - 1]) {
                sum++;
            } else {
                res = Math.max(res,sum);
                sum = 1;
            }
        }
        res = Math.max(res,sum);
        return res;
    }
}